<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../../css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="../../css/enter/register.css" />
	</head>

	<body>
		<div class="mui-content">
		    <div class="logo">
		    	<img src="../../img/enter/logo.png" alt="" />
		    </div>
		    <div class="shuRu">
		    	<div>
		    		<img src="../../img/enter/denglu_1.png" alt="" />
		    		<input type="number" id="phone" placeholder="请输入手机号"/>
		    	</div>
		    	<div>
		    		<img src="../../img/enter/denglu_3.png"/>
		    		<input type="text" id="Vcode" placeholder="请输入验证码" style="width: 110px;"/>
		    		<span class="send">获取验证码</span>
		    	</div>
		    	<div>
		    		<img src="../../img/enter/denglu_2.png"/>
		    		<input type="password" id="password" placeholder="请输入登录密码"/>
		    	</div>
		    	<div>
		    		<img src="../../img/enter/denglu_2.png"/>
		    		<input type="password" id="password1" placeholder="请再次设置登录密码"/>
		    	</div>
		    </div>
		    <div class="enter_register">
		    	<p class="register">注册</p>
		    </div>
		    <div class="forget link" data-link="enter.html">
		    	返回登录 
		    </div>
		    <img src="../../img/enter/bei_jing.png" alt="" class="bg"/>
		    <p class="xieyi">注册表示您已同意平台的相关协议</p>
		</div>
		<script src="../../js/mui.min.js"></script>
		<script src="../../js/jquery-1.7.2.js"></script>
		<script src="../../js/tiaozhuan.js"></script>
		<script type="text/javascript">
			mui.init();
            var hei=$('body').height();
            console.log(hei);
            $('input').focus(function(){
                $('.mui-content').css('height',hei);
                $('body').css('height',hei);
                console.log(hei);
            })
            $('#Vcode').focus(function(){
                $('.mui-content').css({'top':'-65px','transition':'all .5s'});
            })
            $('#Vcode').blur(function(){
                $('.mui-content').css({'top':'0','transition':'all .5s'});
            })
            $('#password').focus(function(){
                $('.mui-content').css({'top':'-130px','transition':'all .5s'});
            })
            $('#password').blur(function(){
                $('.mui-content').css({'top':'0','transition':'all .5s'});
            })
            $('#password1').focus(function(){
                $('.mui-content').css({'top':'-135px','transition':'all .5s'});
            })
            $('#password1').blur(function(){
                $('.mui-content').css({'top':'0','transition':'all .5s'});
            })

            $('.register').on('tap', function() {
                if($('#phone').val() == '' && $('#password').val() == ''&& $('#password1').val() == ''&& $('#Vcode').val() == '') {
                    mui.alert('均不能为空！');
                }
                else if($('#phone').val() == '') {
                    mui.alert('请输入手机号！');
                }
                else if($('#Vcode').val() == ''){
                    mui.alert('请输入验证码！');
                }
                else if($('#password').val() == ''){
                    mui.alert('请输入密码！');
                }
                else if($('#password1').val() == ''){
                    mui.alert('请确认密码！');
                }
                else if($('#phone').val() != '' && $('#password').val() != ''&& $('#password1').val() != ''&& $('#Vcode').val() != '') {
                    var password=$('#password').val();
                    var phone = document.getElementById('phone').value;
                    if(!(/^1(3|4|5|7|8)\d{9}$/.test(phone))) {
                        mui.alert("手机号码有误，请重填");
                    }
                    else if(password.length<6){
                        mui.alert("密码长度必须大于六位！");
                    }
                    else if($('#password').val() != $('#password1').val()){
                        mui.alert("两次密码不一致");
                    }
                    else{
                        mui.openWindow({
                            url:"../../html/enter/wanShan_xinXi.html",
                            id: "../../html/enter/wanShan_xinXi.html",
                            show: {
                                aniShow: 'zoom-fade-out',
                                duration: 300
                            }
                        })

                    }

                }

            })
		</script>
	</body>

</html>